:root {
	--color-green          : #339933;
	--color-green-invert   : #ffffff;
	--color-red            : #993333;
	--color-red-invert     : #ffffff;
	--color-blue           : #333399;
	--color-blue-invert    : #ffffff;
	--color-orange         : #ff9933;
	--color-orange-invert  : #ffffff;
	--color-yellow         : #ffbe00;
	--color-yellow-invert  : #ffffff;
	--color-black          : #363636;
	--color-black-invert   : #ffffff;
	--color-grey           : #d6d6d6;
	--color-light-grey     : #f0f0f0;

	--color-primary        : #ff2e52;
	--color-primary-invert : #ffffff;
	--color-text           : #363636;
}

/* This controls the width of the fixed width layouts */

.fixed {
	width: 960px !important;
}

/* Fonts */

@font-face {
	font-family: "Prompt";
	font-style: normal;
	font-weight: 400;
	src: local("Prompt Regular"), local("Prompt-Regular"), url(../fonts/Prompt-Regular.ttf) format("truetype");
	unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Prompt";
	font-style: normal;
	font-weight: 400;
	src: local("Prompt Regular"), local("Prompt-Regular"), url(../fonts/Prompt-Regular.ttf) format("truetype");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: 'Prompt';
	font-style: normal;
	font-weight: 500;
	src: local("Prompt Medium"), local("Prompt-Medium"), url(../fonts/Prompt-Medium.ttf) format("truetype");
	unicode-range:U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: 'Prompt';
	font-style: normal;
	font-weight: 500;
	src: local("Prompt Medium"), local("Prompt-Medium"), url(../fonts/Prompt-Medium.ttf) format("truetype");
	unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Prompt";
	font-style: normal;
	font-weight: 700;
	src: local("Prompt Bold"), local("Prompt-Bold"), url(../fonts/Prompt-Bold.ttf) format("truetype");
	unicode-range:U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Prompt";
	font-style: normal;
	font-weight: 700;
	src: local("Prompt Bold"), local("Prompt-Bold"), url(../fonts/Prompt-Bold.ttf) format("truetype");
	unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Basic Stuff */

* {
	margin: 0;
}

html {
	height: 100vh;
}

body {
	background: linear-gradient(
		#ff2e52,
		#000000
	);
	background-attachment: fixed;

	font-family: "Prompt", sans-serif;
	font-size: 9pt;

	color: #363636;
}

h1, h2, h3, h4, h5 {
	font-size: 20px;
}

h6 {
	font-size: 1em;
}

br.clear {
	clear: both;
}

img {
	padding: 3px;
}

a {
	text-decoration: underline;
	color: #ff2e52;
}

a:hover {
	text-decoration: none;
}

p {
	line-height: 1.8em;
}

hr {
	margin: 0.3em 0 0.3em 0;
}

iframe {
	border: 0;
}

.pull-right {
	float: right !important;
}

/*
	Text Alignment
*/

.text-left {
	text-align: left;
}

.text-center {
	text-align: center;
}

.text-right {
	text-align: right;
}

/*
       Text Colors
*/
.text-error {
       color: var(--color-red);
}

/* Header */

#header {
	margin: 0 auto;
}

/* Logo */

#logo {
	height: 65px;
	margin-top: 1em;
}

#logo h1 {
	color: #ffffff;
	font-size: 3.5em;
	font-weight: bold;
}

#logo h1 a {
	color: inherit;
	text-decoration: none;
}

/* Main */

.bigbox {
	margin: 0 auto;
	margin-top: 0.5em;
	padding: 1.5em 2em 0 2em;
	background: #ffffff;

	border: 2px solid black;
	border-radius: 3px 3px 3px 3px;
}

section {
	margin-bottom: 2rem;
}

section.is-box {
	padding: 0.75rem 1rem;
	border: 1px solid var(--color-grey);
}

section.is-error {
	color: var(--color-red);
	border: 1px solid var(--color-red);
}

section.is-warning {
	color: var(--color-yellow);
	border: 1px solid var(--color-yellow);
}

section.is-error a, section.is-warning a {
	color: inherit;
}

section.is-error ul, section.is-warning ul {
	padding: 0;
	margin-bottom: 0 !important;
}

section.is-error ul li, section.is-warning ul li {
	list-style-type: none
}

section .title {
	margin-bottom: 1rem;
	border-bottom: 1px solid var(--color-grey);
}

section.is-error .title {
	border-bottom: 1px solid var(--color-red);
}

section.is-warning .title {
	border-bottom: 1px solid var(--color-yellow);
}

#main_inner {
	padding-bottom: 1.5em;
}

#main_inner p {
	margin-bottom: 2em;
}

#main_inner ul {
	margin-bottom: 2em;
}

#main_inner h1 {
	font-size: 1.8em;
	margin-bottom: 1em;
}

#main_header > * {
	display: inline-block;
	vertical-align: baseline;
}

#main_header > span {
	margin-left: 0.8em;
}

#main_header img {
	padding: 0;
}

#footer {
	height: 2.5em;
	margin-bottom: 1.5em;
	padding-bottom: 0.5em;
}

#footer a {
	color: inherit;
	text-decoration: none;
}

#footer a:hover {
	text-decoration: underline;
}

#traffic {
	float: right;
	min-width: 20em;
	line-height: 32px;
}

/* Menu */
#cssmenu {
	padding-top: 0;
	font-weight: 500;
	height: 32px;
}

#cssmenu a {
	color: #363636;
	display: inline-block;
	line-height: 32px;
	padding: 0 1em;
	text-decoration: none;
}

#cssmenu ul {
	list-style: none;
	padding: 0;
}

#cssmenu > ul > li {
	display: inline-block;
}

#cssmenu > ul > li.active a, #cssmenu > ul > li:hover > a {
	color: #ffffff;
	background: #363636;
}

#cssmenu .has-sub:hover > ul {
	display: block;
}

#cssmenu .has-sub ul {
	display: none;
	position: absolute;
	z-index: 1;
}

#cssmenu .has-sub ul li a {
	min-width: 12em;
	background: #ffffff;
	color: #363636;
	display: block;
	line-height: 40%;
	padding: 12px 5px;
	border: 1px solid black;
}

#cssmenu .has-sub ul li:hover a {
	color: #ffffff;
	background: #363636;
}

/* This decorates all tables with class="tbl" */

table {
	*border-collapse: collapse; /* IE7 and lower */
	border-spacing: 0;
}

/*
	Form Tables
*/
table.form {
	width: 100%;

	margin-top: 1rem;
	margin-bottom: 1rem;
}

table.form:last-child {
	margin-bottom: 0;
}

table.form tr td:first-child {
	width: 25%;
}

table.form tr td input[type=text],
table.form tr td input[type=number],
table.form tr td select,
table.form tr td textarea {
	width: 100%;
}

table.form tr.header td {
	font-weight: bold;

	margin-top: 1rem;
}

table.form tr.action td {
	padding-top: 1rem;

	text-align: right;
}

table.form tr.action td form {
	display: inline;
}

.tbl {
	width: 100%;
}

.tbl th {
	color: #ffffff;
	border-top: 1px solid #363636;
	border-bottom: 1px solid #363636;
	background: #363636;
	padding-left: 0.5em;
	padding-right: 0.5em;
}

.tbl th[scope=row] {
	text-align: left;
}

.tbl tr:nth-child(odd) td {
	background-color: var(--color-grey);
}

.tbl tr:nth-child(even) td {
	background-color: var(--color-light-grey);
}

/*
	Classes to overwrite the automatic colouring
*/
.tbl tr.is-odd td {
	background-color: var(--color-grey);
}

.tbl tr.is-even td {
	background-color: var(--color-light-grey);
}

.tbl tr.is-warning td {
	background-color: var(--color-yellow);
}

.tbl th:first-child {
	border-left: 1px solid #363636;
	border-top: 1px solid #363636;
	border-bottom: 1px solid #363636;
}

.tbl th:last-child {
	border-right: 1px solid #363636;
	border-top: 1px solid #363636;
	border-bottom: 1px solid #363636;
}

.tbl th:only-child {
	border: 1px solid #363636;
}

.tbl td {
	padding: 0.25em 0.5em;
}

.tbl tr td:first-child {
	border-left: 1px solid #363636;
}

.tbl tr td:last-child {
	border-right: 1px solid #363636;
}

.tbl tr:first-child td {
	border-top: 1px solid #363636;
}

.tbl tr:last-child td:only-child {
	border-bottom: 1px solid #363636;
}

.tbl tr:last-child td:first-child {
	border-bottom: 1px solid #363636;
}

.tbl tr:last-child td:last-child {
	border-bottom: 1px solid #363636;
}

.tbl tr:last-child td {
	border-bottom: 1px solid #363636;
}

.tbl .status {
	text-align: center;
	font-weight: bold;
}

.tbl .status.is-running, .tbl .status.is-connected {
	background-color: var(--color-green);
	color: var(--color-green-invert);
}

.tbl .status.is-stopped, .tbl .status.is-disconnected {
	background-color: var(--color-red);
	color: var(--color-red-invert);

	width: 33%;
}

.tbl .status.is-connecting {
	background-color: var(--color-orange);
	color: var(--color-orange-invert);
}

.tbl .status.is-vulnerable {
	background-color: var(--color-red);
	color: var(--color-red-invert);
}

.tbl .status.is-disabled, .tbl .status.is-mitigation {
	background-color: var(--color-blue);
	color: var(--color-blue-invert);
}

.tbl .status.is-not-affected {
	background-color: var(--color-green);
	color: var(--color-green-invert);
}

/* Interfaces */

.tbl .intf {
	text-align: center;
	font-weight: bold;
}

.tbl .intf.red {
	background-color: var(--color-red);
	color: var(--color-red-invert);
}

.tbl .intf.green {
	background-color: var(--color-green);
	color: var(--color-green-invert);
}

.tbl .intf.orange {
	background-color: var(--color-orange);
	color: var(--color-orange-invert);
}

.tbl .intf.blue {
	background-color: var(--color-blue);
	color: var(--color-blue-invert);
}

/* Policies */

.tbl .policy {
	text-align: center;
	font-weight: bold;
}

.tbl .policy.is-blocked {
	background-color: var(--color-red);
	color: var(--color-red-invert);
}

.tbl .policy.is-allowed {
	background-color: var(--color-green);
	color: var(--color-green-invert);
}

.tbl .policy.is-rejected {
	background-color: var(--color-black);
	color: var(--color-black-invert);
}

table.fw-nat tbody tr td {
	height: 2.25em;
}

/*
	Graphs
*/

.graph {
	padding: 0.125rem;
}

.graph img {
	width: 100%;
	min-height: 360px;

	margin-bottom: 0.5rem;
	padding: 0;

	border: 1px solid var(--color-grey);
}

.graph ul {
	list-style-type: none;

	display: flex;
	justify-content: center;
}

.graph ul li {
	margin: 0 0.125rem;
}

.graph ul li button {
	background: none;
	border: none;
	cursor: pointer;

	background-color: var(--color-grey);
	color: var(--color-text);

	padding: 0.5rem 1rem;
}

.graph ul li button.selected {
	background-color: var(--color-primary);
	color: var(--color-primary-invert);
}

/* RRD graph images */

div.rrdimage > ul {
	list-style-type: none;
	margin: 0;
	display: flex;
	justify-content: center;
}

.rrdimage li:not(:first-child)::before {
	content: "-";
	padding: 0 0.3em;
}

.rrdimage button {
	padding: 0.3em;
	font-weight: 700;
	color: #ff2e52;
	border: none;
	background: none;
	cursor: pointer;
	text-decoration: none;
}

.rrdimage button:focus {
	outline: none;
	box-shadow: none;
}

.rrdimage button.selected {
	text-decoration: underline;
}

div.rrdimage > img {
	padding: 0;
	max-width: 100%;
	min-height: 290px;
}
